Current Location: Home> Function Categories> decoct

decoct

Convert decimal to octal
Name:decoct
Category:math
Programming Language:php
One-line Description:Convert decimal to octal.

Definition and usage

decoct() function converts decimal to octal.

Example

 <?php
echo decoct ( "30" ) ;
echo decoct ( "10" ) ;
echo decoct ( "1587" ) ;
echo decoct ( "70" ) ;
?>

Try it yourself

grammar

 decoct ( dec_number )
parameter describe
dec_number Required. Specifies the decimal number to be converted.

illustrate

Returns a string containing an octal representation of the given dec_number parameter. The maximum value that can be converted is 4294967295 in decimal, and the result is "3777777777777".

Similar Functions
  • Sow the random number generator seeds srand

    srand

    Sowtherandomnumberge
  • Arctangle of two parameters atan2

    atan2

    Arctangleoftwoparame
  • Convert decimal to binary decbin

    decbin

    Convertdecimaltobina
  • Logarithm with base 10 log10

    log10

    Logarithmwithbase10
  • Combined linear congruent generator lcg_value

    lcg_value

    Combinedlinearcongru
  • Determine whether it is a legal value is_nan

    is_nan

    Determinewhetheritis
  • Further method to sort ceil

    ceil

    Furthermethodtosort
  • Convert hexadecimal to decimal hexdec

    hexdec

    Converthexadecimalto
Popular Articles